package gatech.cs2340.adventuretime.server;


import java.io.*;
import java.net.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import gatech.cs2340.adventuretime.persistent.users.User;
/**
 * This defines how each server-side class will handle it's request on our database
 * @author Win
 *
 */
public interface RequestHandler
{
	/**
	 * It's a lot like a Servlet, but with a bit more data wrapped around the request
	 * I'm probably going to give Clients a user and just pass a client and a db connection in...
	 * 
	 * @param user user performing the request, null if logging in
	 * @param req the HttpRequest object with parameters (attributes)
	 * @param res the HttpResult of a GET
	 * @param services a size 2 array pointing to the db connection object and our client object... seems redundant since client is built at the beginning of request
	 * @param log pointer to our log for obvious reasons
	 * @throws ServletException called in servlets
	 * @throws IOException must expect these as well
	 */
    public void processRequest(Object user, HttpServletRequest req,
        HttpServletResponse res, Object[] services, Object log)
        throws ServletException, IOException;
}